package com.wxsong.authplatform.authweb.service.menu;


import com.wxsong.authplatform.authweb.model.menu.Menu;

import java.util.List;
import java.util.Map;

public interface MenuService {

    Menu getByName(String name);

    List<Menu> list(int from, int pageSize, Map<String, Object> paramMap);

    Long count(Map<String, Object> paramMap);

    int add(Menu menu);

    int updateInfo(Long id, String name, String url, String desc);

    int delete(Long[] ids);

    Menu getById(Long id);

    List<Menu> getByParentId(Long parentId);

    List<Menu> getByParentCode(String parentCode, long curUserId);

    /**
     * 拥有的一级菜单
     * @param userId
     * @return
     */
    List<Menu> findOwnFirstMenu(long userId);

}
